Friend Class jChartLicense
    Inherits License

    Private Const msID As String = "jcomchartjljlion"

    Public Sub New()
        MyBase.New(msID)

        Dim sPath As String = System.IO.Path.GetDirectoryName( _
                System.Reflection.Assembly.GetExecutingAssembly().CodeBase)

        If sPath.IndexOf("file:\") = 0 Then
            sPath = sPath.Substring(6, sPath.Length - 6)
        End If

        MyBase.ReadLicenseFile(sPath & "\jcl.lic")
    End Sub

    Public Function Encrypt(ByVal sValue As String) As String
        Dim oJCO As New JCO.Crypt(msID, False)

        Return oJCO.Encrypt(sValue)
    End Function

    Public Function Decrypt(ByVal sValue As String) As String
        Dim oJCO As New JCO.Crypt(msID, False)

        Return oJCO.Decrypt(sValue)
    End Function
End Class
